package com.pignest.hotel.dao.hibernate;

import java.util.List;

import com.pignest.framework.dao.BaseHibernateDao;
import com.pignest.hotel.beans.RoomType; 
import com.pignest.hotel.dao.RoomTypeDao;

public class RoomTypeHibernateDao extends BaseHibernateDao implements RoomTypeDao {

	@SuppressWarnings("unchecked")
	@Override
	public RoomType getRoomTypeByName(String type) {
		List<RoomType> l = getHibernateTemplate().find("from  RoomType where name=?", type);
		if (l == null || l.size() == 0)
			return null;
		return l.get(0); 
	}
}
